@model ExpertSMS.Models.StoreProductStock

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.OriginalQuantity)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.OriginalQuantity)
    @Html.ValidationMessageFor(model => model.OriginalQuantity)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.CurrentQuantity)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.CurrentQuantity)
    @Html.ValidationMessageFor(model => model.CurrentQuantity)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Date)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Date)
    @Html.ValidationMessageFor(model => model.Date)
</div>

<div class="editor-label">
    Store
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.StoreID, ((IEnumerable<ExpertSMS.Models.Store>)ViewBag.PossibleStores).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.StoreID.ToString(),
        Selected = (Model != null) && (option.StoreID == Model.StoreID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.StoreID)
</div>
<div class="editor-label">
    Product
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.ProductID, ((IEnumerable<ExpertSMS.Models.Product>)ViewBag.PossibleProducts).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.ProductID.ToString(),
        Selected = (Model != null) && (option.ProductID == Model.ProductID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.ProductID)
</div>
<div class="editor-label">
    Unit
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.UnitID, ((IEnumerable<ExpertSMS.Models.Unit>)ViewBag.PossibleUnits).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.UnitID.ToString(),
        Selected = (Model != null) && (option.UnitID == Model.UnitID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.UnitID)
</div>
